package com.peter.draw2

import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Path
import android.util.AttributeSet
import android.view.View

class KArcs : View {
    constructor(context: Context?) : super(context) {}
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {}
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
        context,
        attrs,
        defStyleAttr
    ) {
    }

    constructor(
        context: Context?,
        attrs: AttributeSet?,
        defStyleAttr: Int,
        defStyleRes: Int
    ) : super(context, attrs, defStyleAttr, defStyleRes) {
    }


    private val paint: Paint = Paint()
    private val path: Path = Path()

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)



        path.addArc(200F, 200F, 400F, 400F, -225F, 225F);
        path.arcTo(400F, 200F, 600F, 400F, -180F, 225F, false);
        path.lineTo(400F, 542F);
    }
}